package com.morningstar.qs.api.basic.common.exception;

import java.util.HashMap;
import java.util.Map;

@SuppressWarnings("serial")
@Deprecated
public class QSException extends Exception {

	private String key;
	private String value;
	private Object source;
	private Map<String, String> messages=new HashMap<String, String>();

	public QSException() {
		super();
	}

	public QSException(String cause) {
		super(cause);
	}
	
	public QSException(String message, Throwable cause) {
		super(message, cause);
	}

	public QSException(Throwable cause) {
		super(cause);
	}

	public QSException(Exception e) {
		super(e);
	}
	
	public QSException(Object source) {
		super();
		this.setSource(source);
	}
	
	public QSException(String key, String value) {
		super();
		this.setKey(key);
		this.setValue(value);
	}

	public void putMessage(String key, String message) {
		messages.put(key, message);
	}
	
	
	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public Object getSource() {
		return source;
	}

	public void setSource(Object source) {
		this.source = source;
	}

	public Map<String, String> getMessages() {
		return messages;
	}

	public void setMessages(Map<String, String> messages) {
		this.messages = messages;
	}

}
